���������� �������     ����� ���������������� ���������� ��� ������������ ������� Windows ������ ��������� ���������� ������� ������������ ����, ����������� ������������ �������� �������������� ���������� �� ������ �������. ���� ������� ��� � �������� ������ ���������� ������� ����� ���������� �� �������� � ����� Windows, �� ��� ��������, ��� ������������ ����� �������� ��������� �������������� ����� �� ��������. ��� ������ Visual Basic (Professional � Enterprise) ������������ � ������������ �������� ������� Windows, ������� ��������� ����� ���������� ���������� ������� � ����������.


����������: ������ ������������ ���� ������� ���������� ������� Windows ������ �� ������� ���� �����, ������� � ������ ����� �������������� � �������� ������ � �������������� ���������� ������� Windows � �����������. ���������� ����������� Visual Basic Books Online ��� ����� ������ Professional � Enterprise �������� ������ ����������, ����������� ��� ���������� ���������� �������.

    ����� ������, ����� ������������� ����������� ���������� ������� ���������� �����: ��������� ��������� ����, ���������� ��������������� ���� �������, ������� ���������� ����������� �� ���������� ������, ���������� ���� � �.�. ��������� ���� ������ ����������� � ��������� ���������, �������������� ������ RTF (rich text format) ����� Microsoft. ����������� ����������� ��������� ���������� ������������ ���� ������.


�����: ��������� ����������� ����������� ����������� ����������� ��������� ������� �������� ���������� �������. ���� �� ���, ������� ��������� ������������ ������� � ��� ������, ��� "RoboHelp" ����� BlueSky Software. ���� ����� ������� ������� ���������� �������, �� ����� RoboHelp ������ � ���� ���������� ������. ��� �������� ����� ������� ���������� ������ ����� ��������������� ����������, ����������������� �� �������� shareware. ������ �������� ������ �������� � WINDSK forum ������� CompuServe. ����������� WHAT (Windows Help Authoring Templates) � WHPE (Windows Help Project Editor), ������� ����� ����� �� �������-����� Microsoft Software Developers, ����� ���������� ��������� � �������������.

    ������� ������ Windows ����� �������� � ���� ���� � ��������������� ����������. (��� ������ � Windows 95 ����� ������������ ������� �������������� ������� ����.) �������� ���� �������� ����� ������, ��� Search, ������� ������� ������ �������� ���� � ��������� ������������ ������������ �� ������, ����� ������ ����� ������������� ��� �����. �����, ��� ������ ��������� ����� ����� ����� ������� � ������� �������. ����� ��������� ����� ���������� (��� � � Visual Basic) ����� ��������� ����������-��������� ���������. ���� ������ ��������� ��������� �������� ��� ������� ������� F 1 (��� ��� ������ ������ WhatsThisHelp � ����� Windows 95) � ������ ���������� � ��� ����������� �����, ������� ������������ � ��������� ������.
 

�������� ������������ �������� ���������� �������

    ������� ��������� ��� �������� ���������� ������� �������� ����������� ������ ������������ �������� ������. � ������ ��� ������ ���� �������� ������ (�� ����� ������ - ���� �������) ��� ������, ������������ ����� ��������� �������������. ������ ������������ ������� ������������ � ���� ������������� �������. ��� ��������� ������������ ����� ������������ �� ����� ��� � ����� �������������. ��� �� ����� ������ ������ ������ ��������� ����������� ���������� ������ ��� �������� � ������ ����� ��� ������������� ����������� �� ����� ������� ������� ��������.
    ���� ����������� ������������ ������ ������������ �������� � ������ �����������, ��������� ��� ���������� ������� �� ������. � ���� ������� ����� ���������� ������������� �������� ����������� ��� �������������� ���� � ���������� �������.
 

 
 

�������� ������� ������������ ��������


�����: ���� ����� ���� Iconwrks.rtfB ���������� VBVHC, �� �� ������ ����� �������� �������� ����� RTF. ���� ���� �������� ���������� ���������� ������� ��� ���������� Iconwrks. (����������� ���� ����� ���������� ���������� Iconwrks.��� � ��������� � ��� �� ����������.) �����, ��������� ���������� RTF-����� � ������� ������ Iconwrks.���, ����� �������, ��� ����������� ������� ������� RTF ������������ � �������������� ����������� ���������� �������. ��������, ��� ���� ������� ���������� ������ ������� �������� ����������� ��������. ������ ����� ���������������� �������� ������������� ����������� ������������ ����������� �����������.

    ����������� ��� ����� (�� ������ �����������), ������� ��� �������� ���������� ������� �� ������������ �� ������� ������, ���������� �� �����������������, ��� ����������� ����������� �������� RTF. ��������� �������� ����� ����� ����� ������ � ���, ��� ��������� ��� ��� ���� ������������� ������� RTF, ������� ������ ����� ��������� ��� ������. � �������� ������� ����� �������� ������� ��� ������ ������������ ������ RoboHelp, ������ ������ � ��������� �� ��� ������������.
    � ����� ������, ��� �� ���� ��� ���������� �����, ��������� ��������� ��������, �������������� ������ RTF (rich text format) ��� ���������� �����, ������� ����� ������������ ���������������� ������������ � ���������� �������. (��� ������� � ���, ��� ����������� ��������� ������������ ���� RoboHelp �������� � �������� �������������� ������� � ��������� Microsoft Word, �������, ��� ��������, ��������� ������������ ������������ RTF-�������.)
    ������ ������������ ������ ���������� ������� ������ ���� ������� �� ������� �������� "������ ��������" (hard page break). (���� ������ ���� ������� ��������������, � ������� �� ������ �������� �������, ������� �������� �������� ����������� �������������. ������ "������ ��������" ����� ������ ����� ������� ���������� ������ CTRL+ENTER � ��������� ���������� ����� Microsoft.) ������ ������������ ������ ������ ��������� ������������� ����������� ������, ��������, � ����� ������ ��������� �������� ����. ����������� ������ ������������ ��� �������� � �������, �������������, ������ ������ ������ ����� ���������� ������. �������� ����� ������������ ��� ����������� ������������ ������ � ���������� �������. �����������, ��������� ������������ �������� ���� � ����� ���������� �������� �����.
    �������� �� �������� ������, ������������ ��������������, �������� ������� ��� ���������� ���������� �������. ��������, ����������� ������ ���������� ��� ������ �������������� �������� "#". ����������� ������ ����� ������������ ������� �� � �� Z, �����, ����� � ������� �������������. ������������ ����� ������ ���������� 255 ���������.
    �������� ������������� ������� ���������� ��� ������ �������������� �������� "$" (���� �������). �������� ����� ��������� �� 127 �������� �� ������������ ������ ������� Windows. �, �������, �������� ����� ���������� ��� ������ �������������� �������� "�" (� ������� ��������).
    (�������� ����� �� �������� �������������, ������ ����� ��������� ������������� ������� ����� ��� ���� �������� �����, ���������� �� � ������, ����������� ������� ";". �������� ����� ����� ��������� ������������ ������� �� ������������ ������ �������� ������� Windows. ������������ ����� ��������� ����� �� ������ ��������� 255 ��������.)
    ����� �������, ��� ����� ������������ ������ �� ���� � ��������� ������������.bmp, ������ ��� ��� � �������� �������. ��� ���� ��������� ����������� ����� �������� � ��������������� ����� ������ ������. ����� ����� ��������� ��������� ����������� �� �������� �� ������� ������������ ��������. ���� ��� �������� ���������� ������� ������������ ��������� �������� Word for Windows, �� ���� �� ���������� ����� �������, ���������������� �������� Insert Picture. (��� ������� ����������� �������� ������� ������� ��������������� ������� ������� "By Reference".) ����������� ����� ���������� ������� ����� ����� �������������� � �������� ����� �������� � ������ �����. ���� �� ������������ �������� Word for Windows, �� ������� ������� ������ �� ��������� ����������� � ����� ������������ ��������.
    ������� ��������, ��� ��������� ��������� ������ (��������, "Status Area") ����������� ������� ������. ����� ��������� ������������ � �������� ����� �������� � ������ ��������. ����� �� ������ ����� ���������� ������� �����, ����������� ����� �������� (���� ����� �� ��������� �� ����� � ���������� �������). ����� ��������� ��������� ��������� ������ ����� ���� ������� ���:

JumpString CONTEXT_SroWG

��� ����������� ������, ����������� ����� ������, ������ ���� ��������������� ��� ������� ����� ��� ��������. ����� ��� �� ����� ���������� ������� ����������� ������ ����� ��������� ������, ������������� ��������� ������, ��� �������� �������������� ����������� �������.
 
   


����������: ������ �������� ��������� ������ ��� �������� ������� �� ������������� ���������� ���������.   

�������� ����������-��������� ���������� �������.

    ��������, ����������� �� ���� ���������� �������, �������� ������� ��������� ������ ������� ���� ��� (application). ��� ���� ����� ������� ��� �������� � ��������������� �������, ���������� ��������� ���������:

    �����, �����������, ��� ��� ������ ���� ���������� �������, ������� ����� �������������� � �������� � ����������. ������ ��� ������������ ����������� ����������-��������� ���������� �������, ���������� ��������� ��� ��������.
      ��������, ���� ����������� ��������� �������� 5 ��� �������� HelpContextID ���� File, �� ��������� ���������� ������� ������ �� ���� �����. ����� ����� �� (��� ���) ������ �������� �����������, ��� ������� ���������� �������� �������� HelpContextID � ��������������� ������������ �������� (����� �������� ��� �������� ������� � ��������� �������). � ����� ������ ������������ ������ FILE MENU ������ ����� ����������� ����� 5.


�����: ���� ��������� ��������� �������� ���������� ������������ ����������-��������� ��������� (��� ���������� ������� ������� �������� �� ������� ���������� �������� HelpContextID � ������ ��������), ������� �������� �������� ������� ������� � ������������.

�������� � ���������� ����� �������

    ���� ������� ���������� ������� �������� ��� ����������, ����������� ��� ���������� ������ �����������. ����� �����, �� �������� ������� (�����) ������������ ��� ������������ ������ ����� ����������� ������� � ����������� ������� ID, ������� ����� �������������� � ������� (��� ��� ��������, ��� ������ ������������ ������� ������������ ����� �����������, ������������ � ����� ������� ���������� �������, � ����� ����������).
    ���� ������� ���������� ������� ������������ ����� ������� ����� � ������� ASCII. � �������� ���������� ��� ���� �������� ������ ������� ������������.hpj. ���� ������� ���������� ������� �������� ������ ���� ������ � ������������� ���������, � ����� ����� ��������� ��������� ����������� ��� ������� ������������ ����� ������������ �������� � ������������ �������� ID. ����� ����� ��������� ��� ����������� ������ ������ � ���� �� ������������� �������, ������������� ���� �������.
    ��� ������������ ������������ ����� ����������� ������� ID � ������������ ������������ �������� ���������� ������� ��� ������� ����� ��������� ����� [MAP], ����� ���� ����� ������ (�.�. ����� ������� ������� SPACE ��� TAB) ������� ������� ����������� ����� �������. ��������, ������ [���]-����� ������� ���������� ������� ����� ��������� ��������� ����������:

    [MAP]
    FILE_MENU 5 ;5 is the context number
                    ;Comments follow semicolons
    EDIT_MENU 10 ;10 is context number
    VIEW_MENU 15 ;15 is context number

    ������, ���� ������� ���������� �������� ���������� ������� �� ��������� HelpContextID, ������������� � 5, ������� ����� ������ ��� ������������� ������� FILE_MENU; ��������� HelpContextID � 10 � ������ ���������� �������� ���������� �������, ������� ����� EDIT MENU � �.�.
    ����� �������� ����� ������� ���������� ������� �������� ������ ������� ���������� ������� ������. (�������, ��� ����������, � ������� ��������� ����������, ������ ����������� � ��������� ���������� PATH, � ��������� ������ ���������� ����� ������� ������ ����.) ��������, � ������� Windws 95 ����� ������������ ��� ����� ���������� ������ Run, ��������� �� ���� Start, � ������� ����� �������� ����� ��������:

    C:\VB\HC\HC Named fHelpPi-ojectFile

���� ���������� ��������� � ����������� �� ��������� ���������� (��� ������ Professional). ��� �� ����� ��������:

�� NameOfHelpProjectFile

� IUM ������, ����� ����������, ���������� ����������, ���������� � ���������� PATH.
    ���������� ���������� ������� ����� ������� ���������� ������������, �� ��������������� �����. ��������, ����� ������������� ������ ������������ ����� ����� ��� ��������� ��������� � ����� ��� ����. ����� �����, ����� ������������ ��� ���� ����������������, ���������� ������ Microsoft, ��� ���������� ������������ ����������� ���������� �������. ��� � ������ ���������� ���������� � Visual Basic Books Online. ����� ����� ���������� ������� ���������� ����������, ����������� ������ ���������� ����� Iconwrks.rtf.

������ � ���������� ������� Windows

    ��� ������� � ���������� ������� ����� ������������ ����� ShowHelp ������� ���������� ������. ����� ��������� ������������������ ��������, ������� ���������� ��� ����� ���������:

    ���� ���������� ������� ���������� ������� ����� ������� Windows (��������, ��� ��������� ������� � ������ Windows "Help on Help"), ���������� ������� API - ������� WinHelp. ��� ����� ���������� �������� � ���������� ��������������� �������� ����. ��� 32-������ ������ ���������� ������� ��� ����� ���� ����� ��������:

        Declare Function WinHeip Lib "user32" Alias "WinHelpA" (ByVal hHnd As Long, ByVal IpHclpFu
        As String, ByVal wCommand As Long, ByVal dwData As Long) As Long

    �������� hWnd ("window's handle) �������� ���������� �������� hWnd ������� �����. �������� IpHelpF ��������� ���� � ����� ������� (���� ���� ��������� � ����������, �������� �� ���������� .���-������). ��� ������������ ��������� ���������, ������������ ���������� wCommand:

        Global Const HELP CONTEXT = &H1          'Display topic by id number
        Global Const HELP QUIT -- &H2             'Terminate help
        Global Const HELP INDEX = &H3                 'Display index
        Global Const HELP HELPONHELP = &H4 'Display help on using help
        Global Const HELP SETINDEX = &H5 'Set an alternate Index
        Global Const HELP KEY = &H101                 'Display topic for keyword in Data
        Global Const HELP MULTIKEY = &H201 'Look up keyword in alternate table

    ��������, ��� ����, ����� ������� ����������� ���������� ������� "Help on Help", ���������� ���������� ��������� ���������:

    Public Sub DisplayHelp On Help(X As Form)
        Dim Foo As Long ' dummy variable
        Foo = WinHeip(X.hWnd,"C:\WINDOWS\HELP\WINDOWS.HLP",
        HELP HELPONHELP,CLng(O))
    End Sub

    ����� ����� ����� ������ ����

    DisplayHelp_On_Help_Me

����� �������� ����������� ���������� ������� Windows.


����������: ����� ���������� ��������� hCommand �������� HELP_CONTEXT ������� ���������� ��� ��������� dwData ��������������� ����� ID ����������� ������.

    ���� ��� ������ ���������� ������� ������������ WinHeip API, �� ��� ���� ����� ������� �������������� ���� �������, ��� ����� ����� ������� ������� WinHeip API (�.�. ���������� ������� Windows �������� ��������� �����������). ��� ����� ������� ��������� ������� (������ ��� ����� ������������ ������� Form Unload). ���������� Foo � Bar ������ ����� ���������� ���, ���� ������� ��� �� ����� ������� �������� ��������.

    Sub Form_Unload(Cancel As Integer)
            Dim Foo As Integer, Bar As String 'dummy variables
            Foo = WinHeip(Me.hWnd, Bar, Help_Quit, CLng(O))
    End Sub

���������� ������� What's This

    ������������ ������� Windows 95 ����� ����� ��� ����������-��������� ���������, ������� ���������� ������� ����� ��� ������������ ���������� ��������������� �����, �������������� �� ��������� �������� �����. ��� ���� ��������� ���� �������� ���� ������� ��� �� �������������� ����, ����� ���� ������������ ����� �������� ������ �� ������ �������. � ���������� ���� �������� �� ����� ��������� ����������-��������� ���������� � ��������� �������. ����� ��� ��, ��� � � ������ ��������� ����������-��������� ���������, ��� ���������� ������ ��������� "What's This" ���� ���������� ������������ ����� ����������� � ������� MAP � ����� ������� ���������� �������.


����������: ��� ������������� ����� �������� ����������-��������� ��������� ���������� ���������� �������� True ��� �������� WhatsThisHelp. ����� �����, ���� ���������� ��� �������� WhatsThisHelpID �������� ���������������� ������������ ������ ID.


 
 

    ��� ����������� ����������-��������� ��������� What's This � ���������� �������� ��� �������. �� � ����� ������ �������� WhatsThisHelp ������ ���� ����������� � True.

                    FormObject.ShowWhatThis     �, �������, ����� �������� ������� ������ �������� �� ���������� ��� ������ ������ WhatsThisMode. ������ ������ ��� ���� ����� ��, ��� � � ������, ����� ������������ ������� �� ������ What's This �� ������ ���������. (�������� ����� ������ ����� �������������� ��� ������� ���������� � ������ ��������, ����� ������������ ����� ������ �������� ������� ����������� �� ������ ����.)